Session Types with Gradual Typing
نویسنده
چکیده
Session types enable fine-grained static control over communication protocols. Gradual typing is a means to safely integrate statically and dynamically typed program fragments. We propose a calculus for synchronous functional two-party session types, augment this calculus with a dynamically typed fragment as well as coercion operations between statically and dynamically typed parts, and establish its basic metatheory: type preservation and progress. A technical novelty is the notion of coercions for the choice operator in session types which is related to coercions of sum types.
منابع مشابه
A Gradual Interpretation of Union Types
Union types allow to capture the possibility of a term to be of several possibly unrelated types. Traditional static approaches to union types are untagged and tagged unions, which present dual advantages in their use. Inspired by recent work on using abstract interpretation to understand gradual typing, we present a novel design for union types, called gradual union types. Gradual union types ...
متن کاملGradual Refinement Types Extended Version with Proofs
Refinement types are an effective language-based verification technique. However, as any expressive typing discipline, its strength is its weakness, imposing sometimes undesired rigidity. Guided by abstract interpretation, we extend the gradual typing agenda and develop the notion of gradual refinement types, allowing smooth evolution and interoperability between simple types and logicallyrefin...
متن کاملAbstract Data Types without the Types
Data Types without the Types Philip Wadler (Edinburgh University, Scotland [email protected]) Dedicated to David Turner on the occasion of his 70’th birthday Abstract: The data abstraction mechanism of Miranda may be adapted to a dynamically typed programming language by applying ideas from gradual typing.
متن کاملGradual Typing for Annotated Type Systems
Refinement type systems have been proposed by a number of researchers to sharpen the guarantees of existing type systems. Examples are systems that distinguish empty and non-empty lists by type, taint tracking and information flow control, dimension analysis, and many others. In each case, the type language is extended with annotations that either abstract semantic properties of values beyond t...
متن کاملGradual Set-Theoretic Types
Problem and motivation. A static type system can be an extremely powerful tool for a programmer, providing early error detection, and offering strong compile-time guarantees on the behavior of a program. However, compared to dynamic typing, static typing often comes at the expense of development speed and flexibility, as statically-typed code might be more difficult to adapt to changing require...
متن کامل